package cn.xxstudy.blog.dao

import cn.xxstudy.blog.entity.Tags
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Query

/**
 * 作者：wuxinxi on 2020/11/25
 * 包名：cn.xxstudy.blog.dao
 * TODO:标签查询
 */
interface TagsRepository : JpaRepository<Tags, Long> {
    fun findTagsByTagName(tagName: String): Tags?

    @Query("select t from Tags t ")
    fun findTop(pageable: Pageable): List<Tags>

    fun deleteTagsByTagName(tagName: String): Int


}